package xinyou.jh.net.title
{
	import xinyou.jh.manager.GameManager;
	import xinyou.jh.net.JHReceiver;
	import xinyou.net.SocketConnection;
	import xinyou.net.event.PacketEvent;
	
	public class TitleReceiver extends JHReceiver
	{
		public function TitleReceiver(socket:SocketConnection)
		{
			super(socket);
		}
		
		override protected function initCallBack():void
		{
			addCallBack([101,22],getTitle)
		}
		
		/**
		 * 获取称号  
		 */		
		public function getTitle(result:Object):void
		{
			dispatchEvent(new TitleEvent(TitleEvent.GETTITLE,result));
			GameManager.getInstance().mainVO.titles = result.m_arrTitleIDs;
		}
	}
}